from auto_huangjiaxin.day5作业.autoframe.common.base import Base,By

class LoginPage(Base):
    def input_username(self,username):
        #登录功能，定位用户名并输入
        self.find_element((By.NAME,'username')).send_keys(username)

    def input_password(self,password):
        #定位密码并输入
        self.find_element(('name','password')).send_keys(password)

    def remember(self):
        #定位记住密码按钮
        self.click(('id','remember'))

    def btn_login(self):
        self.click(('class name','loginbtn'))


if __name__ == '__main__':
    login=LoginPage('chrome')
    login.get('https://ecshop.test2.shopex123.com/user.php')

    #执行测试用例
    login.input_username('xixi')
    login.input_password('123456')
    login.btn_login()
    login.quit()